﻿using System.Collections.Generic;
using Monkey.Warrenty.Data;
using Monkey.Warrenty.Data.Interfaces;
using Monkey.Warrenty.EntityModel;

namespace Monkey.Warrenty.Biz
{
    public class CategoryBiz
    {
        private readonly ICategoryDao _categoryDao;
        private readonly IServiceTypeDao _serviceTypeDao;
        private readonly IErrorDao _errorDao;

        public CategoryBiz()
        {
            _categoryDao = new CategoryDao();
            _serviceTypeDao = new ServiceTypeDao();
            _errorDao = new ErrorDao();
        }

        public List<WarrantyType> GetAllWarrantyTypes()
        {
            return _categoryDao.GetAllWarrantyTypes();
        }

        #region ServiceType Methods

        public List<ServiceType> GetAllServiceTypes()
        {
            return _serviceTypeDao.GetAllServiceTypes();
        }

        #endregion

        #region Error Methods

        public List<Error> GetAllErrors()
        {
            return _errorDao.GetAllErrors();
        }

        #endregion
    }
}
